package com.example.xpagedemoproject;

import android.app.Application;

import com.xuexiang.xpage.BuildConfig;
import com.xuexiang.xpage.PageConfig;
import com.xuexiang.xpage.base.XPageActivity;
import com.xuexiang.xrouter.launcher.XRouter;
import com.xuexiang.xutil.XUtil;

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        XUtil.init(this);
        XUtil.debug(true);
        PageConfig.getInstance()
                .setContainActivityClazz(XPageActivity.class)
                .debug("PageLog")
                .init(this);
        initRouter();
    }
    private void initRouter(){
        if (BuildConfig.DEBUG) {
            XRouter.openLog();
            XRouter.openDebug();
        }
        XRouter.init(this);
    }
}
